﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Lawyer.Web.Admin
{
    public partial class admin_agencydetail : System.Web.UI.Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    string PostID = strid;
                    ShowInfo(PostID);
                }
            }
        }

        private void ShowInfo(string AgencyID)
        {
            Lawyer.BLL.AgencyInfo bll = new Lawyer.BLL.AgencyInfo();
            Lawyer.Model.AgencyInfo model = bll.GetModel(AgencyID);
            this.lblAgencyID.Text = model.AgencyID;
            this.lblName.Text = model.Name;
            this.lblAgencyRate.Text = model.AgencyRate.ToString();
            this.lblEmail.Text = model.Email;
            this.lblCity.Text = model.City;
            this.lblTelphone.Text = model.Telphone;
            this.lblFax.Text = model.Fax;
            this.lblAddress.Text = model.Address;
            this.lblAvatarURL.Text = model.AvatarURL;
            this.lblNote.Text = model.Note;


        }
    }
}
